package org.wyl.helloworld;

import us.codecraft.webmagic.Request;
import us.codecraft.webmagic.Spider;

/**
 * 爬虫启动类
 * @author 吴宇亮 on 2022/7/25 13:30
 */
public class HelloworldSpider {

    private static final String URL = "https://search.51job.com/list/000000,000000,0000,00,9,99,%25E4%25BF%25A1%25E6%2581%25AF%25E7%25AE%25A1%25E7%2590%2586%25E4%25B8%258E%25E4%25BF%25A1%25E6%2581%25AF%25E7%25B3%25BB%25E7%25BB%259F,2,1.html?lang=c&postchannel=0000&workyear=99&cotype=99&degreefrom=04&jobterm=99&companysize=99&ord_field=0&dibiaoid=0&line=&welfare=";

    public static void main(String[] args) {
        Request request = new Request(URL);

        Spider.create(new HelloworldProcessor()) // 页面解析器
                //.addUrl("https://s.weibo.com/top/summary?cate=realtimehot") // 要解析的页面：微博热搜
                .addRequest(request)
                .addPipeline(new HelloworldPipeline()) // 解析后的内容怎么处理
                .run();
    }

}
